home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / lantas.zip / NETTEST.PAS < prev    next >
Pascal/Delphi Source File  |  1992-01-01  |  3KB  |  107 lines

  1. Program TstNet;
  2.  
  3. USES CRT,LANOS,NCB;
  4.  
  5. VAR Buffer : Array[00..255] of CHAR;
  6.     Device : String[16];
  7.     Name   : String[16];
  8.     Path   : String;
  9.  
  10.     Adapter: Byte;
  11.  
  12.     Index  : Word;
  13.     DevType: Byte;
  14.  
  15.     Account: user_account;
  16.     Message: message_buffer;
  17.     Queue  : queue_entry;
  18.     Printer: PS;
  19.     Stream : logical_stream;
  20.     User   : active_user_entry;
  21.  
  22.     Resource : String;
  23.     ACL      : Word;
  24.  
  25.     _Time    : Time_Block;
  26.  
  27.     Amount   : DWORD;
  28.     Error    : Word;
  29. BEGIN
  30.   ClrScr;
  31.   WriteLn;
  32.   WriteLn('<< DEMO-PROGRAM for LANOS-Unit >>');
  33.   WriteLn('=================================');
  34.   WriteLn;
  35.  
  36.   IF NETBIOS_INSTALLED THEN
  37.   WriteLn('NETBIOS              installed')
  38.   ELSE
  39.   WriteLn('NETBIOS          NOT installed');
  40.   WriteLn; TextColor(LightBlue);
  41.   WriteLn('LANTASTIC specific NetWare');
  42.   WriteLn; TextColor(White);
  43.  
  44.   IF REDIR_INSTALLED THEN
  45.   WriteLn('REDIR                installed') ELSE
  46.   WriteLn('REDIR            NOT installed');
  47.  
  48.   IF SUPER_REDIR_INSTALLED THEN
  49.   WriteLn('REDIR                has popup-capability');
  50.  
  51.   IF SERVER_INSTALLED THEN
  52.   WriteLn('SERVER               installed') ELSE
  53.   WriteLn('SERVER           NOT installed');
  54.  
  55.   IF LANPUP_INSTALLED THEN
  56.   WriteLn('LANPUP               installed') ELSE
  57.   WriteLn('LANPUP           NOT installed');
  58.  
  59.   WriteLn;
  60.   IF NOS_Check2AInterface THEN
  61.   WriteLn('Alternate 2A Interface detected');
  62.   WriteLn;
  63.   IF REDIR_INSTALLED THEN
  64.   BEGIN
  65.     WriteLn('Major LANOS ID : ',LANOS_Maj);
  66.     WriteLn('Minor LANOS ID : ',LANOS_Min);
  67.     WriteLn;
  68.     WriteLn('Machine Name is : ',GetMachineName);
  69.     WriteLn;
  70.  
  71.     REPEAT UNTIL KeyPressed;
  72.     ClrScr;
  73.  
  74.     WriteLn('Listing redirected devices...');
  75.     WriteLn;
  76.     WriteLn('Type    Device     Network-Path');
  77.     FOR I := 1 TO 79 DO Write('─'); WriteLn;
  78.  
  79.  
  80.  
  81.     Index := 0;
  82.     REPEAT
  83.       NOSGetRedirDevice(Index,Device,Path,DevType);
  84.       IF (NOSErrNo <> 18) THEN
  85.       BEGIN
  86.         CASE DevType OF
  87.           04 : Write('Disk    ');
  88.           03 : Write('Printer ');
  89.         END;
  90.         Write(Device); GotoXY(20,Wherey);WriteLn(Path);
  91.       END;
  92.       Inc(Index);
  93.     UNTIL (NOSErrNo = 18);
  94.     WriteLn;
  95.     WriteLn('This DEMO only uses MS-DOS compatible Network-Calls !!!');
  96.     WriteLn('A LANTASTIC specific DEMO depends on your machine-configuration.');
  97.     WriteLn;
  98.   END ELSE
  99.   BEGIN
  100.     WriteLn('Sorry ! It''s necessary that a redirector is loaded !');
  101.     WriteLn('        Analyzing terminated...');
  102.     Halt($01);
  103.   END;
  104.  
  105. END.
  106.  
  107.